package com.lonewalker.completablefuturedemo;

import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;

/**
 * @author LoneWalker
 * @date 2023/2/12
 * @description
 */
public class demo6 {
    public static void main(String[] args) {
        CompletableFuture<Void> completableFuture1 = CompletableFuture.supplyAsync(() -> {
            System.out.println("supplyAsync执行");
            return 5;
        }).thenAccept(result ->{
            System.out.println(result);
            System.out.println("thenAccept执行");
        });
    }
}
